package com.zb_study.Homework04;

public class Person {
    public String name;
    private double monthSal;

    public Person(String name, double monthSal) {
        this.name = name;
        this.monthSal = monthSal;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getMonthSal() {
        return monthSal;
    }

    public void setMonthSal(double monthSal) {
        this.monthSal = monthSal;
    }

    public void printSal() {
        System.out.println(name + " 全年工资为：" + 12 * monthSal);
    }
}
